import { defineStore } from "../pinia/index";

export const useStore1 = defineStore("store1", {
    state: () => {
        return {
            count1: 1,
            count2: 2,
        }
    },
    getters: {
        doubleCount(state: any) {
            return state.count1 + this.count2;
        }
    },
    actions: {
        count1Add(this: any, payload: number = 1) {
            this.count1 = this.count1 + payload;
        },
        count2Add(this: any, payload: number = 1) {
            this.count2 = this.count2 + payload;
        },
    }
})